/*************************************************
Author: Aven
Date: 2/28/2013
Description:
Notes:
*************************************************/

#ifndef __CVipMgr_h__
#define __CVipMgr_h__

#include "CVipConfig.h"
#include "../item/CDropItem.h"
#include "MsgVip.pb.h"

class CVipMgr
{
public:
    CVipMgr()
    {
    }

    virtual ~CVipMgr()
    {
    }

    int Init();
    int LoadConfig(const char* szLogPath);

    int GetVipInfo(CPlayerBaseInfo& stBaseInfo, MsgAnsVipInfo& stAns);

    int GetVipGiftInfo(CPlayerBaseInfo& stBaseInfo, int iGiftType, MsgAnsVipGiftInfo& stAns);

    int GetVipGiftOpen(CPlayerBaseInfo& stBaseInfo, CPlayerDetailInfo& stPlayerDetail, CPlayerDetailInfoEx1& stPlayerDetailEx1, int iGiftId, int iGiftType, MsgAnsOpenGift& stAns);

    int TriggerGiftAward(unsigned int iGID, int iVipLevel, int iGiftType, MsgAnsOpenGift& stAns);

    //iModuleId见commclass vip 配置
    int GetVipDestNum(int iVipLevel, int iModuleId, int &iExtDestNum);

    int GetVipAwardItems(unsigned int iGID, CVipAwardConfigData& stConfigData, CDropItem& stDropItem);

    void NotifyGiftStatus(CPlayerBaseInfo& stBaseInfo, int iGiftType);

    //购买金币
    int PrepaidGold(CPlayerBaseInfo& stBaseInfo, CPlayerDetailInfo & stDetailInfo, int iGoldNums, bool bIsYellow);

    void NotifyVipInfo(CPlayerBaseInfo& stBaseInfo);

    //设置黄钻缺省VIP
    void SetYellowDefaultVip(CPlayerBaseInfo& stPlayerBaseInfo);

    int GetVipMount (bool bIsYellow, CDropItem& stDropItem);

private:
    CVipConfig _stVipConfig;

public:
    CYellowGiftConfig _stYellowGiftConfig;
    CBlueGiftConfig _stBlueGiftConfig;
};

#endif // __CVipMgr_h__
